import random

string = 'abcdefghijklmnopqrstuvwxyz'

num_count = {}
for i in range(100):
    res = ''.join(random.choices(string, k=2))
    if res in num_count:
        num_count[res] += 1
    else:
        num_count[res] = 1

sort_string = sorted(num_count.items(), key=lambda item: item[1])
print(sort_string)

# 结果没有做到降序输出
